<?php /* Smarty version 2.6.20, created on 2012-03-16 19:24:52
         compiled from _core/_include/module/_mvc/control/handletablepaymentproblem.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', '_core/_include/module/_mvc/control/handletablepaymentproblem.tpl', 53, false),)), $this); ?>
function HandleTablePaymentProblem(gui, items, options) {
  this._gui = gui;
  this._items = items;
  this._options = options;
  this._popupBox = new PopupBox();
  this._popupBox2 = new PopupBox2();
  
  this._user = (options && options.user) ? options.user : null;
  this._date = (options && options.date) ? options.date : null;
  this._selects = (options && options.selects) ? options.selects : [];
  this._cond = (options && options.cond) ? options.cond : null;
  this._callbackFunc = (options && options.callbackFunc) ? options.callbackFunc : null;
  
  this._createElements();
}

HandleTablePaymentProblem.prototype._createElements = function() {
  var _self = this, unique = MiscUtils.unique();
  DOMUtils.removeChildElements(this._gui.checkAll);

  if (this._items.length == 0) {
    tr = this._gui.main.insertRow(-1);
    td = tr.insertCell(-1);
    td.style.height = '25px';
    td.style.textAlign = 'center';
    td.style.borderLeft = 'solid 1px #694247';
    td.style.borderRight = 'solid 1px #694247';
    td.style.borderBottom = 'solid 1px #694247';
    td.style.backgroundColor = '#ffffff';
    td.colSpan = 9;
    td.appendChild(document.createTextNode('N/A'));
  }
  
    for(var i = 0, il = this._items.length; i < il; i++) {
      var object = this._items[i];
      
      tr = this._gui.main.insertRow(-1);
      tr.style.backgroundColor = (tr.rowIndex % 2 == 0) ? '#faf9f4' : '#ffffff';
      if (this._cond == 1) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment1FirstSolved != 2) {
            td.appendChild(check);
          }
        } else {
          if (object.isPayment1FirstSolved != 1) {
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment1FirstSolved == 0) ? 'No Solved' : (object.isPayment1FirstSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 2) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment1SecondSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment1SecondSolved != 1) { 
            td.appendChild(check);
          }
        }
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment1SecondSolved == 0) ? 'No Solved' : (object.isPayment1SecondSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 3) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment1ThirdSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment1ThirdSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment1ThirdSolved == 0) ? 'No Solved' : (object.isPayment1SecondSolved == 1) ? 'Solved' : 'Approved'));
        
      } else if (this._cond == 4) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment1ForthSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment1ForthSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment1ForthSolved == 0) ? 'No Solved' : (object.isPayment1ForthSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 5) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment2FirstSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment2FirstSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment2FirstSolved == 0) ? 'No Solved' : (object.isPayment2FirstSolved == 1) ? 'Solved' : 'Approved'));
        
      } else if (this._cond == 6) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment2SecondSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment2SecondSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment2SecondSolved == 0) ? 'No Solved' : (object.isPayment2SecondSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 7) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment3FirstSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment3FirstSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment3FirstSolved == 0) ? 'No Solved' : (object.isPayment3FirstSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 8) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPayment3SecondSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPayment3SecondSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPayment3SecondSolved == 0) ? 'No Solved' : (object.isPayment3SecondSolved == 1) ? 'Solved' : 'Approved'));
        
      } else if (this._cond == 9) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPaymentForthSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPaymentForthSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPaymentnoSolved == 0) ? 'No Solved' : (object.isPaymentnoSolved == 1) ? 'Solved' : 'Approved'));
      } else if (this._cond == 10) {
        td = tr.insertCell(-1);
        td.style.borderLeft = 'solid 1px #694247';
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        var check = DOMUtils.createInput(null, unique + '_' + i, 'checkbox', '', null);
        check._object = object;
        check.onclick = function() { if (this.checked ==  true) {
                                       _self._selects[_self._selects.length] = this._object;
                                     } else {
                                       MiscUtils.remove(_self._selects, this._object, 'trackId');
                                     }
                                   };
        if (this._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
          if (object.isPaymentnoSolved != 2) { 
            td.appendChild(check);
          }
        } else {
          if (object.isPaymentnoSolved != 1) { 
            td.appendChild(check);
          }
        }
        
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'center';
        td.appendChild(document.createTextNode((object.isPaymentnoSolved == 0) ? 'No Solved' : (object.isPaymentnoSolved == 1) ? 'Solved' : 'Approved'));
      }
      
      
      td = tr.insertCell(-1);
      td.style.height = '25px';
      td.style.textAlign = 'left';
      td.style.padding = '0 0 0 15px';
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      var a = document.createElement('a');
      a.href = '#';
      a._c = object;
      a.appendChild(document.createTextNode(DlmanageUtils.customerId(object.customerId) + object.flag));
      a.onclick = function() { if (_self._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
                                 location.href = '?p=pageadmin&t=pagecustomerold&m=' + JSON.stringify({ a: 2, b: 1 }) + '&opts=' + JSON.stringify({ id: this._c.customerId, track: this._c.trackId }); 
                                 return false;
                               } else if (_self._user.type == '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
') {
                                 location.href = '?p=pagemanager&t=pagecustomerold&m=' + JSON.stringify({ a: 2, b: 1 }) + '&opts=' + JSON.stringify({ id: this._c.customerId, track: this._c.trackId }); 
                                 return false;
                               } else {
                                 location.href = '?p=pageasst&t=pagecustomerold&m=' + JSON.stringify({ a: 2, b: 1 }) + '&opts=' + JSON.stringify({ id: this._c.customerId, track: this._c.trackId });
                                 return false;
                               }
                             };
      td.appendChild(a);
      
      td = tr.insertCell(-1);
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      td.style.height = '25px';
      td.style.textAlign = 'left';
      td.style.padding = '0 0 0 15px';
      td.appendChild(document.createTextNode(SimpleDate.format(object.createdDate)));
      td = tr.insertCell(-1);
      td.style.textAlign = 'left';
      td.style.padding = '0 0 0 15px';
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      td.appendChild(document.createTextNode((object.date == 0) ? '00/00/0000' : SimpleDate.format(object.date)));
      td = tr.insertCell(-1);
      td.style.textAlign = 'left';
      td.style.padding = '0 0 0 15px';
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      td.appendChild(document.createTextNode('$' + object.price));
      td = tr.insertCell(-1);
      td.style.textAlign = 'left';
      td.style.padding = '0 0 0 15px';
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      td.appendChild(document.createTextNode('$' + object.payment));
      td = tr.insertCell(-1);
      td.style.textAlign = 'center';
      td.style.borderRight = 'solid 1px #694247';
      td.style.borderBottom = 'solid 1px #694247';
      td.appendChild(document.createTextNode((object.price == 0) ? '0.00%' : ((object.payment / object.price) * 100).toFixed(2) + '%'));
      
      if (this._cond == 1) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 2) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 3) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 4) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 5) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 6) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 7) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 8) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 9) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      } else if (this._cond == 10) {
        td = tr.insertCell(-1);
        td.style.borderRight = 'solid 1px #694247';
        td.style.borderBottom = 'solid 1px #694247';
        td.style.textAlign = 'left';
        td.style.padding = '0 0 0 15px';
        var span1 = document.createElement('span');
        td.appendChild(span1);
        span1.style.lineHeight = '24px';
        span1.appendChild(document.createTextNode(((object.note) ? ((String(object.note).length > 40) ? object.note.substring(0, 40) + '...' : object.note) : '(None)' )));
        if (object.note && object.note.length > 40) {
          var img = document.createElement('img');
          img.src = 'images/common/enlarge.png';
          img.style.cursor = 'pointer';
          img._object = object;
          img.onclick = function() { var pos, func1, func2;
                                     var pos = DOMUtils.findPos(this);
                                     var div = document.createElement('div');
                                     func1 = function() { _self._popupBox._close();
                                                        };
                                     div.appendChild(document.createTextNode(this._object.note));
                                     MiscUtils.dialog(_self._popupBox, pos, div, func1, null);
                                     return false;
                                   };
          td.appendChild(img);
        }
      }
    }
  
  this._gui.checkAll.checked = false;
  this._gui.checkAll._unique = unique;
  this._gui.checkAll.onclick = function() { if (this.checked == true) {
                                             for (var i = 0, il = _self._items.length; i < il; i++) {
                                                var object = _self._items[i];
                                                if (document.getElementById(this._unique + '_' + i) && !document.getElementById(this._unique + '_' + i).checked) {
                                                  _self._selects[_self._selects.length] = object;
                                                  document.getElementById(this._unique + '_' + i).checked = true;
                                                }
                                              }
                                            } else {
                                              for (var i = 0, il = _self._items.length; i < il; i++) {
                                                var object = _self._items[i];
                                                if (document.getElementById(this._unique + '_' + i)) {
                                                  MiscUtils.remove(_self._selects, object, 'trackId');
                                                  document.getElementById(this._unique + '_' + i).checked = false;
                                                }
                                              }
                                            }
                                          };
};